package org.lwxyz.tools.mail;

import org.lwxyz.utils.PropertyUtil;

/**
 * @author yuwei
 * @version 1.0-SNAPSHOT
 * @description 邮件的配置类
 * @date 2018-1-22 15:42:35
 */
public class MailAuthorize {
    private static String prop = "mail.properties";
    /**
     * 邮件收发服务器
     */
    public static String host;

    /**
     * 邮件地址
     */
    public static String email;

    /**
     * 协议
     */
    public static String protocol;

    /**
     * 是否需要验证
     */
    public static String auth;

    /**
     * 发件邮箱用户名
     */
    public static String username;

    /**
     * 发件邮箱密码
     */
    public static String password;

    /**
     * 初始化配置信息
     */
    static {
        host = PropertyUtil.getProperty(prop, "server", "mail.lwxyz.org");
        email = PropertyUtil.getProperty(prop, "email", "admin@lwxyz.org");
        protocol = PropertyUtil.getProperty(prop, "protocol", "smtp");
        auth = PropertyUtil.getProperty(prop, "auth", "true");
        username = PropertyUtil.getProperty(prop, "username", "admin");
        password = PropertyUtil.getProperty(prop, "password", "yuwei.12345");
    }
}
